<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>记单词</title>
    <link rel="stylesheet" href="/static/plugins/bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/css/dashboard.css">

</head>
<body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/user/home/">单词助手</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            {% if request.user.is_authenticated %}
            <li><a href="/user/mydetail/">{{ request.user.username }}</a></li>
            <li><a href="/user/logout/">注销</a></li>
            {% else %}
            <li><a href="/user/login/">登录</a></li>
            <li><a href="/user/register/">注册</a></li>
            {% endif %}


          </ul>
        </div>
      </div>
    </nav>

    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
          <ul class="nav nav-sidebar">
            <li><a href="/user/home/">首页</a></li>
            <li><a href="/user/mydetail/">个人资料</a></li>
            <li><a href="/user/mybook/">个人词本</a></li>
            <li class="active"><a href="/user/memorize/">记单词</a></li>
              <li><a href="/user/takenotes/">单词笔记</a></li>
          </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
         <div>
        {% for row in posts.object_list %}
            <h1>{{ row.word_value }}</h1>
            <h4>音标:{{ row.phonetic }}</h4>
            <h4>中文释义:{{ row.zh_meaning }}</h4>
            <h4>例句:{{ row.sentence }}</h4>
            <h4>单词笔记:{{ row.word_notes }}</h4>
        {% endfor %}

       </div>
            <div>
    {% if posts.has_previous %}
        <a href="?page={{ posts.previous_page_number }}">上一个</a>
    {% endif %}
    {% if posts.has_next %}
        <a href="?page={{ posts.next_page_number }}">下一个</a>
    {% endif %}
</div>


 <form action="" method="POST">
          {% csrf_token %}<br>
          添加单词笔记: <input type="text" name="user_wordnotes" value="{{ user_detail.user_wordnotes }}" style="width: 200px;height: 100px"><br><br>
          <button class="btn btn-primary" type="submit">提交</button>
          <button class="btn btn-primary" type="reset">重置</button>
 </form>
        </div>

      </div>
    </div>


    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>


</body>
</html>